package com.gwt.material.client.user.api;

import com.gwt.cloud.result.ApiResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletRequest;

@Api(tags = "客户端-用户相关接口")
@RequestMapping("/client/user")
public interface WeChatLoginApi {

    @ApiOperation(value = "获取微信登陆二维码地址",notes = "获取微信登陆二维码地址")
    @PostMapping("/wechat/qrcode")
    ApiResult<String> wechatQrCode();

    @ApiOperation(value = "微信扫码授权登陆",notes = "微信扫码授权登陆")
    @GetMapping("/wechat/login")
    ApiResult<String> weChatLogin(@RequestParam String code, @RequestParam String state, HttpServletRequest request);
}
